package com.gingko.duominuo.utils

import android.content.Context
import android.content.pm.PackageManager


fun isApplicationAvailable(context: Context, packageName: String): Boolean {
    val packageManager: PackageManager = context.getPackageManager()
    val installedPackages = packageManager.getInstalledPackages(0)
    for (packageInfo in installedPackages) {
        if (packageInfo.packageName == packageName) {
            return true
        }
    }
    return false
}
